* Label variables first (required for outreg2)
label variable fedfunds "Federal Funds Rate (%)"
label variable fac_score "FAC Score"
label variable inflation "Inflation Rate (%)"
label variable unemployment "Unemployment Rate (%)"
label variable gdp_growth "GDP Growth (%)"

* Generate lags
tsset yq
gen L1_fac = L.fac_score
gen L4_fac = L4.fac_score
label variable L1_fac "FAC Score (t-1)"
label variable L4_fac "FAC Score (t-4)"

* Create output directory
cap mkdir "results"
cap mkdir "results/main"

* Table 1: Baseline Taylor Rule
* Model 1: Standard Taylor Rule
newey fedfunds inflation unemployment, lag(4)
outreg2 using "results/main/table1_baseline.doc", replace word ///
    title("Table 1: Augmented Taylor Rule with FAC Stance") ///
    ctitle("Taylor Rule") ///
    label dec(3) ///
    addtext(FAC Controls, No, Period, 1968-2025)

* Model 2: Add lagged FAC
newey fedfunds inflation unemployment L1_fac, lag(4)
outreg2 using "results/main/table1_baseline.doc", append word ///
    ctitle("+ FAC(t-1)") ///
    label dec(3) ///
    addtext(FAC Controls, Yes, Period, 1968-2025)

* Model 3: Add 4-quarter lag
newey fedfunds inflation unemployment L1_fac L4_fac, lag(4)
outreg2 using "results/main/table1_baseline.doc", append word ///
    ctitle("+ FAC(t-4)") ///
    label dec(3) ///
    addtext(FAC Controls, Yes, Period, 1968-2025)
